﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AnQinFrameWorkAPI.Entity.SystemCore.Entity;

/// <summary>
///     菜单按钮表模型
/// </summary>
[Table("MenuButton")]
public class MenuButtonModel
{
    #region 关联

    /// <summary>
    ///     菜单表
    /// </summary>
    public virtual MenuModel Menu { get; set; }

    #endregion

    #region 字段

    /// <summary>
    ///     菜单按钮id（主键）
    /// </summary>
    [Key]
    [MaxLength(36)]
    public Guid Id { get; set; }

    /// <summary>
    ///     菜单id
    /// </summary>
    [MaxLength(36)]
    public Guid MenuId { get; set; }

    /// <summary>
    ///     按钮key
    /// </summary>
    [MaxLength(20)]
    public string Key { get; set; }

    /// <summary>
    ///     按钮名称
    /// </summary>
    [MaxLength(20)]
    public string Name { get; set; }

    /// <summary>
    ///     按钮备注
    /// </summary>
    [Column(TypeName = "nvarchar(max)")]
    public string? Remark { get; set; }

    #endregion
}